A stack lang

Why concatenative programming matters

I don't now why I tought that stack based languages where... too dumb to be typed

Texo lang like contexts could really work here

The idea of making a pure statically-typed concatenative programming language seems really appealing now

Maybe it could like this?

factorial :: int -> int =
  (1 - factorial *)                # n (1 - factorial *)                      -- int (int -> int)
  (pop 1)                          # n (1 - factorial *) (pop 1)              -- int (int -> int) ('a -> int)
  < n then else | n then else n >  # n (1 - factorial *) (pop 1) n            -- int (int -> int) ('a -> int) int
  1 leq                            # n (1 - factorial *) {{ :true | :false }} -- int (int -> int) bool
  if                               # {{ 1 | n 1 - factorial * }}              -- int

main :: unit ->{io} unit =
  6 factorial print